﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>shoppingcartcnpm - Shop Everything</title>
	<link rel="stylesheet" href="/public/css/admin/general.css" type="text/css" media="screen" />
	<!--[if IE 6]>
		<link rel="stylesheet" href="/public/css/admin/ie6.css" type="text/css" media="screen," />
	<![endif]-->
	<link rel="stylesheet" type="text/css" href="/public/css/flexigrid/flexigrid/flexigrid.css">
	<script type="text/javascript" src="/public/js/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="/public/js/flexigrid.js"></script>
</head>
<body>
	<a id="logo" title="Admin page"><img src="css/images/logo.jpg" alt="Admin page" /></a>
	<div id="container">
		<ul class="menu">
			<li id="news" class="active">News</li>
			<li id="categories">Categories</li>
			<li id="products">Products</li>
			<li id="suppliers">Suppliers</li>
			<li id="users">Users</li>
		</ul>
		<span class="clear"></span>
		<div class="content news">
			<h1>Latest News</h1>
			<ul>
				<li><img src="css/images/bullet.gif" alt="-" /> Boobles: First theme on Themeforest released!</li>
				<li><img src="css/images/bullet.gif" alt="-" /> Cokidoo becomes official</li>
				<li><img src="css/images/bullet.gif" alt="-" /> plusmusica.com private beta invitations</li>
				<li><img src="css/images/bullet.gif" alt="-" /> yensdesign.com 2.0 launched!</li>
			<ul>
		</div>
		<div class="content categories">
			<h1>List Category</h1>
			<ul>
				<?php echo $this->partialLoop('index/_category.phtml',$this->category) 
				?>	
			<ul>

		</div>
		<div class="content products">
			<h1>Danh mục mặt hàng</h1>
			<ul>
				<li><img src="css/images/bullet.gif" alt="-" /> <a href="http://www.plusmusica.com">www.plusmusica.com</a> - Online jukebox!</li>
				<li><img src="css/images/bullet.gif" alt="-" /> <a href="http://www.cokidoo.com">www.cokidoo.com</a> - Awesome startup! :)</li>
				<li><img src="css/images/bullet.gif" alt="-" /> <a href="http://www.cokidoo.com">www.pixelartgames.com</a> - Do you want pixel art games? ;)</li>
				<li><img src="css/images/bullet.gif" alt="-" /> <a href="http://www.dmsconsulting.es">www.dmsconsulting.es</a> - Great guys</li>
			<ul>
		</div>

		<div class="content suppliers">
			<h1>Nhà cung cấp</h1>
			<?php echo $this->addSuppliersForm ?>
			<table class="flexme1">
				<tbody>
				<tr>
					<?php echo $this->partialLoop('index/_supplier.phtml',$this->suppliers)?>	
				</tr>
				</tbody>
			</table>
			<br />

			<script type="text/javascript">
					$('.flexme1').flexigrid(
						{
							url: '/public/php/post2.php',
							dataType: 'json',
							colModel : [
							{display: 'Nhà cung cấp', name : 's_ten', width:100,  sortable : true, align: 'center'},
							{display: 'Xuất xứ', name : 's_diachi', width: 100, sortable : true, align: 'left'},
							],					
							buttons : [
								{name: 'Add', bclass: 'add', onpress : test},
								{name: 'Delete', bclass: 'delete', onpress : test},
								{separator: true}
								],
							sortname: "s_ten",
							sortorder: "asc",
							usepager: true,
							singleSelect: true,
							title: 'Suppliers',
							useRp: true,
							rp: 15,
							showTableToggleBtn: true,
							width: 700,
							height: 200
						}
					);
					function test(com,grid)
					{
						if (com=='Delete')
							{
								$('.trSelected', grid).each(function() {
									var s_ten = $(this).attr('s_ten');
									//id = id.substring(id.lastIndexOf('row')+3);
									alert("Edit supplier: " + s_ten);
								});
							}
						else if (com=='Add')
							{
								alert('Add New Item');
							}			
					}

					$('b.top').click
					(
						function ()
						{
							$(this).parent().toggleClass('fh');
						}
					);				
							
			</script>
			<style>
			
			.flexigrid div.fbutton .add
				{
					background: url(/public/css/flexigrid/images/add.png) no-repeat center left;
				}	

			.flexigrid div.fbutton .delete
				{
					background: url(/public/css/flexigrid/images/close.png) no-repeat center left;
				}	

		</style>	
		</div>		
		
		
		<div class="content users">
			<h1>You may visit</h1>
			<ul>
				<li><img src="css/images/bullet.gif" alt="-" /> <a href="http://www.plusmusica.com">www.plusmusica.com</a> - Online jukebox!</li>
				<li><img src="css/images/bullet.gif" alt="-" /> <a href="http://www.cokidoo.com">www.cokidoo.com</a> - Awesome startup! :)</li>
				<li><img src="css/images/bullet.gif" alt="-" /> <a href="http://www.cokidoo.com">www.pixelartgames.com</a> - Do you want pixel art games? ;)</li>
				<li><img src="css/images/bullet.gif" alt="-" /> <a href="http://www.dmsconsulting.es">www.dmsconsulting.es</a> - Great guys</li>
			<ul>
		</div>
	</div>
	<script type="text/javascript" src="/public/js/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="/public/js/admin/tabs.js"></script>
</body>
</html>